package com.hxkj.dao.impl;

import com.hxkj.dao.RankingListDao;
import com.hxkj.mapper.RankingListMapper;
import com.hxkj.domain.po.RankingList;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-06-05 19:32:55
*
*/
@Service("rankingListDao")
public class RankingListDaoImpl implements RankingListDao {

    @Resource
    private RankingListMapper rankingListMapper;

    @Override
    public RankingList get(Integer id) {
        return rankingListMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<RankingList> get(RankingList rankingList) {
        return rankingListMapper.select(rankingList);
    }

    @Override
    public int delete(Integer id) {
        return rankingListMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int delete(RankingList rankingList) {
        return rankingListMapper.delete(rankingList);
    }

    @Override
    public int save(RankingList rankingList) {
        return rankingListMapper.insert(rankingList);
    }

    @Override
    public int update(RankingList rankingList) {
        return rankingListMapper.update(rankingList);
    }
}
